<template>
	<view>
		
		<uni-list>
		    <uni-list :border="true">
		        <!-- 显示圆形头像  :insert="true" -->
		        <uni-list-chat :avatar-circle="true" title="暂无" avatar="/static/images/tou.png"  note="本月排名: 第3名" time="2020-02-02" ></uni-list-chat>
		    </uni-list>
		</uni-list>
		
		  <my-sign-calendar
		    ref="calendar"
		    :signData="signData"
		    :signList="signList"
		    @callbackSign="callbackSign"
		  >
		  </my-sign-calendar>
		
		<uni-group title="今日打卡: 0 次,本月打卡: 1 次" top="0" background-color="#413f3e">
			
							
		</uni-group>
		    
			
		<custom-tarbar class="bar" :selected="1"></custom-tarbar>

	</view>
</template>

<script>
	import customTarbar from '@/components/custom-tarbar.vue';
	import mySignCalendar from '@/components/my-sign-calendar/my-sign-calendar';
	export default {
		components: {
		    'custom-tarbar': customTarbar,
			 mySignCalendar
		},
		data() {
			return {
				signData: {
				    start: '2019-08-01', // 开始的日期（yyyy-mm-dd），默认‘2019-08-01’
				    ismake: true, // 是否开启补签
				    type: 'month' // 日历模式（月 => month，周 => week）
				  },
				 signList: [
				    { year: '2021', month: '5', day: '18'}
				  ],
			}
		},
		methods: {
			// 签到回调
			callbackSign(data) {
			  console.log(data)
			  // ajax请求，更新this.signList数据
			  // ajax请求成功，调用data.callback方法更新视图
			  data.callback && data.callback(data.data)
			  uni.showToast({
			    title: data.msg,
			    icon: 'none'
			  })
			}
		}
	}
</script>

<style>
	
	.bar{
		position: fixed;  
		bottom: 0rpx;
	}

</style>
